//
//  ListItemTableViewCell.m
//  ZooNgonDoiOS
//
//  Created by Trung sound on 7/5/12.
//  Copyright (c) 2012 Personal. All rights reserved.
//

#import "ListItemTableViewCell.h"

@implementation ListItemTableViewCell
@synthesize vImgItem = _vImgItem;
@synthesize lbAddress = _lbAddress;
@synthesize lbDistance = _lbDistance;
@synthesize lbNameItem = _lbNameItem;

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        _vImgItem = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 298, 70)];
        _vImgItem.backgroundColor = [UIColor orangeColor];
        
        _vNameItem = [[UIView alloc]initWithFrame:CGRectMake(0, 70, 298, 25)];
        _vNameItem.backgroundColor = [UIColor brownColor];
        _vFooter = [[UIView alloc]initWithFrame:CGRectMake(0, 95, 320, 24)];
        
        _lbNameItem = [[UILabel alloc]initWithFrame:CGRectMake(5, 5, 290, 20)];
        [_lbNameItem setBackgroundColor:[UIColor clearColor]];

        _lbAddress = [[UILabel alloc]initWithFrame:CGRectMake(5, 5, 240, 20)];
        [_lbAddress setBackgroundColor:[UIColor greenColor]];
        
        _lbDistance = [[UILabel alloc]initWithFrame:CGRectMake(260, 5, 30, 20)];
        [_lbDistance setBackgroundColor:[UIColor blueColor]];;
        
        [_vNameItem addSubview:_lbNameItem];
        [_vFooter addSubview:_lbAddress];
        [_vFooter addSubview:_lbDistance];
        
        [self addSubview:_vImgItem];
        [self addSubview:_vNameItem];
        [self addSubview:_vFooter];
        
    }
    return self;
}

- (void) viewDidLoad {
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
